const express = require("express");
const HairProject = require("../models/huiyuan");
const router = new express.Router();

router.post("/huiyuan", async (req, res) => {
    console.log(req.body);
    const result = await HairProject.create(req.body);
    res.send("提交成功！！");
});

router.get("/huiyuancx", async (req, res) => {
    console.log(req.query);
    const result = await HairProject.find(req.query, {
        _id: 0,
        __v: 0
    });
    res.send(result);
});
module.exports = router;
